<template>
	<van-swipe-cell>
		<van-cell :border="false">

			<van-row style="padding: 1vh;" @click="openChatPage(msg)">
				<div style="margin-right: 3vw;">
					<van-image width="10vw" height="10vw" fit="cover" :src="data.headImgSrc" round />
				</div>
				
				<table>
					<tr>
						<td>
							<strong style="color: black;">
								{{data.userName}}
							</strong>
						</td>
					</tr>
					<tr>
						<td  style="width: 70vw;">
							<van-text-ellipsis :content="data.context" />
						</td>
					</tr>
				</table>
				<div>
					
				</div>
			</van-row>



		</van-cell>
		<template #right>
			<van-button square type="danger" text="删除" style="height: 100%;width: 10vh;" />
		</template>
	</van-swipe-cell>
</template>

<script>
	export default {
		props: {
			data: Object,
			openPage: Function
		},
		methods: {
			openChatPage() {
				this.openPage(this.data);
			}
		}
	}
</script>

<style>
</style>